package pl.prv.polanie.client.dto;

import com.google.gwt.user.client.rpc.IsSerializable;



/**
 * SemesterDTO entity. @author MyEclipse Persistence Tools
 */

public class SemesterDTO extends java.lang.Object implements IsSerializable {


    // Fields    

     private long id;
     private StudiesTypeDTO studiesType;
     private SemesterTypeDTO semesterType;
     private Integer yearNumber;
     private boolean visibleForOrdinaryUsers;
//     private YearNumberDTO yearNumber;

    // Constructors

    /** default constructor */
    public SemesterDTO() {
    }

    
    /** full constructor */
    public SemesterDTO(StudiesTypeDTO studiesType, SemesterTypeDTO semesterType, Integer yearNumber, boolean visibleForOrdinaryUsers) {
        this.studiesType = studiesType;
        this.semesterType = semesterType;
        this.yearNumber = yearNumber;
        this.visibleForOrdinaryUsers = visibleForOrdinaryUsers;
    }

   
    // Property accessors

    public long getId() {
        return this.id;
    }
    
    public void setId(long id) {
        this.id = id;
    }

    public StudiesTypeDTO getStudiesType() {
        return this.studiesType;
    }
    
    public void setStudiesType(StudiesTypeDTO studiesType) {
        this.studiesType = studiesType;
    }

    public SemesterTypeDTO getSemesterType() {
        return this.semesterType;
    }
    
    public void setSemesterType(SemesterTypeDTO semesterType) {
        this.semesterType = semesterType;
    }


    
    public Integer getYearNumber() {
		return yearNumber;
	}


	public void setYearNumber(Integer yearNumber) {
		this.yearNumber = yearNumber;
	}


	public String toLabel() {
    	String result;
    	result = yearNumber + ", " + semesterType.getName() + ", " + studiesType.getName();
    	return result;
    }


	public boolean isVisibleForOrdinaryUsers() {
		return visibleForOrdinaryUsers;
	}


	public void setVisibleForOrdinaryUsers(boolean visibleForOrdinaryUsers) {
		this.visibleForOrdinaryUsers = visibleForOrdinaryUsers;
	}

}